diff --git a/alib2std/src/extensions/linear_set.hpp b/alib2std/src/extensions/linear_set.hpp
index 91b0bcaaae5c2ee28f6688549f74f2278c4917e3..2fabe018c0f4c1fd8198773a4d1884510de0bc04 100644
--- a/alib2std/src/extensions/linear_set.hpp
+++ b/alib2std/src/extensions/linear_set.hpp
@@ -39,9 +39,9 @@ namespace ext {
  * \brief
  * Implementation of set mimicking the iterface of the standard library set. The inner representation is using sorted vector of unique value.
  *
- * \param T the type of stored values
- * \param Compare the less comparator used to determinine order between elements - defaults to std::less < T >
- * \param Alloc the allocator of elements - defaults to std::allocator < T >
+ * \tparam T the type of stored values
+ * \tparam Compare the less comparator used to determinine order between elements - defaults to std::less < T >
+ * \tparam Alloc the allocator of elements - defaults to std::allocator < T >
  */
 template < class T, class Compare = std::less<T>, class Alloc = std::allocator<T> >
 class linear_set {
diff --git a/alib2std/src/extensions/ptr_array.hpp b/alib2std/src/extensions/ptr_array.hpp
index 272cf7190c14b26b9101e037269b6c53b4aa7721..b32e3de76f82cf80e1089bdc9466ff225df725c1 100644
--- a/alib2std/src/extensions/ptr_array.hpp
+++ b/alib2std/src/extensions/ptr_array.hpp
@@ -1,6 +1,22 @@
 /*
  * ptr_array.hpp
  *
+ * This file is part of Algorithms library toolkit.
+ * Copyright (C) 2017 Jan Travnicek (jan.travnicek@fit.cvut.cz)
+
+ * Algorithms library toolkit is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+
+ * Algorithms library toolkit is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with Algorithms library toolkit.  If not, see <http://www.gnu.org/licenses/>.
+ *
  * Created on: Feb 28, 2014
  * Author: Jan Travnicek
  */
@@ -19,52 +35,160 @@
 
 namespace ext {
 
+/**
+ * \brief
+ * Implementation of array storing synamicaly allocated instances of given type. The class mimicks the iterface of the standard library array, but effectively allowing polymorphic objects to be stored inside.
+ *
+ * \tparam T the type of stored values
+ * \tparam N the size of the array
+ */
 template < class T, std::size_t N >
 class ptr_array {
+	/**
+	 * \brief
+	 * The array of pointers to stored values
+	 */
 	std::array < T *, N > m_data;
 
 public:
-
+	/**
+	 * \brief
+	 * The type of values.
+	 */
 	using value_type = T;
 
+	/**
+	 * \brief
+	 * The type of sizes.
+	 */
 	using size_type = std::size_t;
+
+	/**
+	 * \brief
+	 * The type of size differences.
+	 */
 	using diference_type = std::ptrdiff_t;
 
+	/**
+	 * \brief
+	 * The type of reference to values.
+	 */
 	using reference = value_type &;
+
+	/**
+	 * \brief
+	 * The type of reference to constant values.
+	 */
 	using const_reference = const value_type &;
+
+	/**
+	 * \brief
+	 * The type of pointer to values.
+	 */
 	using pointer = T *;
-	using const_pointer = T * const;
 
+	/**
+	 * \brief
+	 * The type of pointer to constant value.
+	 */
+	using const_pointer = const T *;
+
+	/**
+	 * \brief
+	 * The type of values iterator.
+	 */
 	using iterator = dereferencing_iterator < typename std::array < T *, N >::iterator >;
+
+	/**
+	 * \brief
+	 * The type of constant values iterator.
+	 */
 	using const_iterator = dereferencing_iterator < typename std::array < T *, N >::const_iterator >;
 
+	/**
+	 * \brief
+	 * The type of reverse values iterator.
+	 */
 	using reverse_iterator = dereferencing_iterator < typename std::array < T *, N >::reverse_iterator >;
+
+	/**
+	 * \brief
+	 * The type of constant reverse values iterator.
+	 */
 	using const_reverse_iterator = dereferencing_iterator < typename std::array < T *, N >::const_reverse_iterator >;
 
+	/**
+	 * \brief
+	 * Constructor of the array of pointers from parameter values. The resulting array is of size of the parameter pack.
+	 *
+	 * \tparam Types ... the pack of source values type
+	 *
+	 * \param args ... the actual source parameters
+	 */
 	template < class ... Types >
-	ptr_array ( Types && ... args ) : m_data ( make_array ( ext::clone ( std::forward < Types > ( args ) ) ... ) ) {
+	ptr_array ( Types && ... args ) : m_data ( make_array < T * > ( ext::clone ( std::forward < Types > ( args ) ) ... ) ) {
 	}
 
+	/**
+	 * \brief
+	 * The default constructor initializing the values of the array to the defaultly constructed value of T.
+	 *
+	 * \tparam R the actual value to default construct on every array index
+	 * \tparam M miror of the array size
+	 */
+	template < class R = T, std::size_t M = N, typename std::enable_if < M != 0 >::type >
 	ptr_array ( ) {
 		for ( size_type i = 0; i < N; ++ i )
-			m_data.at ( i ) = nullptr;
+			m_data.at ( i ) = new R ( );
 	}
 
-	ptr_array ( const ptr_array& other ) {
+	/**
+	 * \brief
+	 * The default constructor initializing the values of the array to the defaultly constructed value of T.
+	 *
+	 * \tparam M miror of the array size
+	 */
+	template < std::size_t M = N, typename std::enable_if < M == 0 >::type >
+	ptr_array ( ) {
+	}
+
+	/**
+	 * \brief
+	 * Copy constructor cloning all values in the source array.
+	 *
+	 * \param other the source array
+	 */
+	ptr_array ( const ptr_array & other ) {
 		for ( size_type i = 0; i < N; ++ i )
 			m_data.at ( i ) = ext::clone ( other.at ( i ) );
 	}
 
+	/**
+	 * \brief
+	 * Move constructor intended to transfer ownership of pointers from source to new instance.
+	 *
+	 * \param other the source array
+	 */
 	ptr_array ( ptr_array && other ) noexcept {
 		for ( size_type i = 0; i < N; ++ i )
-			m_data.at ( i ) = ext::clone ( std::move ( other.at ( i ) ) );
+			m_data.at ( i ) = std::exchange ( other.m_data.at ( i ), nullptr );
 	}
 
+	/**
+	 * \brief
+	 * Destructor of the pointer array.
+	 */
 	~ptr_array ( ) {
 		for ( size_type i = 0; i < N; ++ i )
 			delete m_data.at ( i );
 	}
 
+	/**
+	 * \brief
+	 * Copy operator of assignment. The values of the source array are cloned to the new array.
+	 *
+	 * \param other the source instance
+	 */
 	ptr_array < T, N > & operator = ( const ptr_array < T, N > & other ) {
 		if ( this == & other )
 			return * this;
@@ -77,164 +201,369 @@ public:
 		return *this;
 	}
 
+	/**
+	 * \brief
+	 * Move operator of assignment. The inner array of this and other instance are swapped.
+	 *
+	 * \param other the source instance
+	 */
 	ptr_array < T, N > & operator = ( ptr_array < T, N > && other ) {
 		std::swap ( m_data, other.m_data );
 
 		return *this;
 	}
 
+	/**
+	 * \brief
+	 * Fills the array with copies of \p value
+	 *
+	 * \param value the filling value
+	 */
 	template < class R >
 	void fill ( const R & value ) {
 		for ( size_type i = 0; i < N; ++ i )
 			m_data.at ( i ) = ext::clone ( value );
 	}
 
+	/**
+	 * \brief
+	 * Getter of value on \p index.
+	 *
+	 * \param index the position to access
+	 *
+	 * \return reference to the value on given index
+	 */
 	reference at ( size_type index ) {
 		return * m_data.at ( index );
 	}
 
+	/**
+	 * \brief
+	 * Getter of value on \p index.
+	 *
+	 * \param index the position to access
+	 *
+	 * \return reference to the value on given index
+	 */
 	const_reference at ( size_type index ) const {
 		return * m_data.at ( index );
 	}
 
+	/**
+	 * \brief
+	 * Array subscript operator.
+	 *
+	 * \param the index to retrieve
+	 *
+	 * \return reference to the value on given index
+	 */
 	reference operator [ ] ( size_type index ) {
 		return * m_data [ index ];
 	}
 
+	/**
+	 * \brief
+	 * Array subscript operator.
+	 *
+	 * \param the index to retrieve
+	 *
+	 * \return reference to the value on given index
+	 */
 	const_reference operator [ ] ( size_type index ) const {
 		return * m_data [ index ];
 	}
 
+	/**
+	 * \brief
+	 * Getter of the first value in the array.
+	 *
+	 * \return reference to the first value in the array
+	 */
 	reference front ( ) {
 		return * m_data.front ( );
 	}
 
+	/**
+	 * \brief
+	 * Getter of the first value in the array.
+	 *
+	 * \return reference to the first value in the array
+	 */
 	const_reference front ( ) const {
 		return * m_data.front ( );
 	}
 
+	/**
+	 * \brief
+	 * Getter of the last value in the array.
+	 *
+	 * \return reference to the last value in the array
+	 */
 	reference back ( ) {
 		return * m_data.back ( );
 	}
 
+	/**
+	 * \brief
+	 * Getter of the last value in the array.
+	 *
+	 * \return reference to the last value in the array
+	 */
 	const_reference back ( ) const {
 		return * m_data.back ( );
 	}
 
+	/**
+	 * \brief
+	 * Test function whether pointer on \p index.
+	 *
+	 * \param index the tested index
+	 *
+	 * \return true if the pointer on \p index is null
+	 */
 	bool null ( size_type index ) const {
 		return m_data.at ( index ) == NULL;
 	}
 
-	/* T * const * data ( ) noexcept {
-		return m_data.data ( );
-	}
-
-	T const * const * data ( ) const noexcept {
-		return m_data.data ( );
-	} */
-
+	/**
+	 * \brief
+	 * Iterator to the begining of the values range in the array.
+	 *
+	 * \return iterator to the begining
+	 */
 	iterator begin ( ) noexcept {
 		return dereferencer ( m_data.begin ( ) );
 	}
 
+	/**
+	 * \brief
+	 * Iterator to the begining of the values range in the array.
+	 *
+	 * \return iterator to the begining
+	 */
 	const_iterator begin ( ) const noexcept {
 		return dereferencer ( m_data.begin ( ) );
 	}
 
+	/**
+	 * \brief
+	 * Iterator to the begining of the values range in the array.
+	 *
+	 * \return iterator to the begining
+	 */
 	const_iterator cbegin ( ) const noexcept {
 		return dereferencer ( m_data.cbegin ( ) );
 	}
 
+	/**
+	 * \brief
+	 * Iterator one past the last element of the values range in the array.
+	 *
+	 * \return iterator to the end
+	 */
 	iterator end ( ) noexcept {
 		return dereferencer ( m_data.end ( ) );
 	}
 
+	/**
+	 * \brief
+	 * Iterator one past the last element of the values range in the array.
+	 *
+	 * \return iterator to the end
+	 */
 	const_iterator end ( ) const noexcept {
 		return dereferencer ( m_data.end ( ) );
 	}
 
+	/**
+	 * \brief
+	 * Iterator one past the last element of the values range in the array.
+	 *
+	 * \return iterator to the end
+	 */
 	const_iterator cend ( ) const noexcept {
 		return dereferencer ( m_data.cend ( ) );
 	}
 
+	/**
+	 * \brief
+	 * Reverse iterator to the begining of the reversed range of values in the array.
+	 *
+	 * \return reverse iterator to the begining
+	 */
 	reverse_iterator rbegin ( ) noexcept {
 		return dereferencer ( m_data.rbegin ( ) );
 	}
 
+	/**
+	 * \brief
+	 * Reverse iterator to the begining of the reversed range of values in the array.
+	 *
+	 * \return reverse iterator to the begining
+	 */
 	const_reverse_iterator rbegin ( ) const noexcept {
 		return dereferencer ( m_data.rbegin ( ) );
 	}
 
+	/**
+	 * \brief
+	 * Reverse iterator to the begining of the reversed range of values in the array.
+	 *
+	 * \return reverse iterator to the begining
+	 */
 	const_reverse_iterator crbegin ( ) const noexcept {
 		return dereferencer ( m_data.crbegin ( ) );
 	}
 
+	/**
+	 * \brief
+	 * Reverse iterator one past the last element of the reversed range of values in the array.
+	 *
+	 * \return reverse iterator to the end
+	 */
 	reverse_iterator rend ( ) noexcept {
 		return dereferencer ( m_data.rend ( ) );
 	}
 
+	/**
+	 * \brief
+	 * Reverse iterator one past the last element of the reversed range of values in the array.
+	 *
+	 * \return reverse iterator to the end
+	 */
 	const_reverse_iterator rend ( ) const noexcept {
 		return dereferencer ( m_data.rend ( ) );
 	}
 
+	/**
+	 * \brief
+	 * Reverse iterator one past the last element of the reversed range of values in the array.
+	 *
+	 * \return reverse iterator to the end
+	 */
 	const_reverse_iterator crend ( ) const noexcept {
 		return dereferencer ( m_data.crend ( ) );
 	}
 
+	/**
+	 * \brief
+	 * Array emptines test.
+	 *
+	 * \return true it array is empty, false othervise
+	 */
 	bool empty ( ) const noexcept {
 		return m_data.empty ( );
 	}
 
+	/**
+	 * \brief
+	 * Getter of the array size.
+	 *
+	 * \return the size of the array
+	 */
 	size_type size ( ) const noexcept {
 		return m_data.size ( );
 	}
 
+	/**
+	 * \brief
+	 * Returns the maximal number of values possible to store inside the container.
+	 *
+	 * \return the maximal number of values
+	 */
 	size_type max_size ( ) const noexcept {
 		return m_data.max_size ( );
 	}
 
-	void reserve ( size_type new_cap ) {
-		m_data.reserve ( new_cap );
-	}
-
-	size_type capacity ( ) const noexcept {
-		return m_data.capacity ( );
-	}
-
-	void shrink_to_fit ( ) {
-		m_data.shrink_to_fit ( );
-	}
-
+	/**
+	 * \brief
+	 * Setter of value in the array on position specified by iterator specified by \p pos. The value is cloned from the \p value.
+	 *
+	 * \param pos the iterator specifying position to set
+	 * \param value the value to place at given position
+	 *
+	 * \return iterator to the set value
+	 */
 	template < class R >
 	iterator set ( const_iterator pos, R && value ) {
 		return set ( pos, ext::clone ( std::forward < R > ( value ) ) );
 	}
 
+	/**
+	 * \brief
+	 * Setter of value in the array on position specified by iterator specified by \p pos. The value is specified by pointer to the value. The array takes ownership of the pointer.
+	 *
+	 * \param pos the iterator specifying position to set
+	 * \param value the pointer to value to place at given position
+	 *
+	 * \return iterator to the set value
+	 */
 	iterator set ( const_iterator pos, T * value ) {
 		delete m_data.at ( std::distance ( cbegin ( ), pos ) );
 		m_data.at ( std::distance ( cbegin ( ), pos ) ) = value;
 		return dereferencer ( m_data.begin ( ) + std::distance ( cbegin ( ), pos ) );
 	}
 
+	/**
+	 * \brief
+	 * Setter of internaly constructed value into the array on position specified by iterator specified by \p pos. The value is constructed from paramter pack.
+	 *
+	 * \tparam R the actual type of constructed value
+	 * \tparam Args ... types of value constructor parameters
+	 *
+	 * \param pos the iterator specifying position to set
+	 * \param args ... value constructor parameters
+	 *
+	 * \return iterator to the set value
+	 */
 	template < class R, class ... Args >
 	iterator emplace_set ( const_iterator pos, Args && ... args ) {
 		return set ( pos, new R ( std::forward < Args > ( args ) ... ) );
 	}
 
+	/**
+	 * Swaps two instances of pointer array
+	 *
+	 * \param x the other instance to swap with
+	 */
 	void swap ( ptr_array & other ) {
 		swap ( this->m_data, other.m_data );
 	}
 
+	/**
+	 * \brief
+	 * Getter of value on index given by template paramter.
+	 *
+	 * \tparam I the index to access
+	 *
+	 * \return the value on specified index.
+	 */
 	template < std::size_t I >
 	auto & get ( ) & {
 		return * std::get < I > ( m_data );
 	}
 
+	/**
+	 * \brief
+	 * Getter of value on index given by template paramter.
+	 *
+	 * \tparam I the index to access
+	 *
+	 * \return the value on specified index.
+	 */
 	template < std::size_t I >
 	const auto & get ( ) const & {
 		return * std::get < I > ( m_data );
 	}
 
+	/**
+	 * \brief
+	 * Getter of value on index given by template paramter.
+	 *
+	 * \tparam I the index to access
+	 *
+	 * \return the value on specified index.
+	 */
 	template < std::size_t I >
 	auto && get ( ) && {
 		return std::move ( * std::get < I > ( m_data ) );
@@ -245,25 +574,66 @@ public:
 
 namespace std {
 
+/**
+ * \brief
+ * Specialisation of get function for pointer arrays
+ *
+ * \tparam I the index to access
+ * \tparam Type the type of stored values
+ * \tparam N the size of the array
+ *
+ * \return reference to value on given index
+ */
 template < std::size_t I, class Type, std::size_t N >
 auto & get ( ext::ptr_array < Type, N > & tpl ) {
 	return tpl.template get < I > ( );
 }
 
+/**
+ * \brief
+ * Specialisation of get function for pointer arrays
+ *
+ * \tparam I the index to access
+ * \tparam Type the type of stored values
+ * \tparam N the size of the array
+ *
+ * \return reference to value on given index
+ */
 template < std::size_t I, class Type, std::size_t N >
 const auto & get ( const ext::ptr_array < Type, N > & tpl ) {
 	return tpl.template get < I > ( );
 }
 
+/**
+ * \brief
+ * Specialisation of get function for pointer arrays
+ *
+ * \tparam I the index to access
+ * \tparam Type the type of stored values
+ * \tparam N the size of the array
+ *
+ * \return reference to value on given index
+ */
 template < std::size_t I, class Type, std::size_t N >
-auto && get ( ext::ptr_array < Type, N> && tpl ) {
-	return tpl.template get < I > ( );
+auto && get ( ext::ptr_array < Type, N > && tpl ) {
+	return std::move ( tpl ).template get < I > ( );
 }
 
 } /* namespace std */
 
 namespace ext {
 
+/**
+ * Operator to print the array to the output stream.
+ *
+ * \param out the output stream
+ * \param array the array to print
+ *
+ * \tparam T the type of values inside the array
+ * \tparam N the size of the array
+ *
+ * \return the output stream from the \p out
+ */
 template < class T, std::size_t N >
 std::ostream& operator<<(std::ostream& out, const ext::ptr_array < T, N > & ptr_array) {
 	out << "[";
@@ -279,8 +649,23 @@ std::ostream& operator<<(std::ostream& out, const ext::ptr_array < T, N > & ptr_
 	return out;
 }
 
+/**
+ * Specialisation of the compare structure implementing the three-way comparison.
+ *
+ * \tparam T the type of values inside the array
+ * \tparam N the size of the array
+ */
 template < class T, std::size_t N >
 struct compare < ext::ptr_array < T, N > > {
+
+	/**
+	 * Implementation of the three-way comparison.
+	 *
+	 * \param first the left operand of the comparison
+	 * \param second the right operand of the comparison
+	 *
+	 * \return negative value of left < right, positive value if left > right, zero if left == right
+	 */
 	int operator()(const ext::ptr_array < T, N > & first, const ext::ptr_array < T, N > & second) const {
 		static compare<typename std::decay < T >::type > comp;
 		for(auto iterF = first.begin(), iterS = second.begin(); iterF != first.end(); ++iterF, ++iterS) {
@@ -291,6 +676,14 @@ struct compare < ext::ptr_array < T, N > > {
 	}
 };
 
+/**
+ * Overload of to_string function.
+ *
+ * \param value the array to be converted to string
+ *
+ * \tparam T the type of values inside the array
+ * \tparam N the size of the array
+ */
 template < class T, std::size_t N >
 std::string to_string ( const ext::ptr_array < T, N > & value ) {
 	std::stringstream ss;
@@ -298,43 +691,135 @@ std::string to_string ( const ext::ptr_array < T, N > & value ) {
 	return ss.str();
 }
 
+/**
+ * \brief
+ * Specialisation of equality operator for pointer array.
+ *
+ * \tparam T the type of values inside the array
+ * \tparam N the size of the array
+ *
+ * \param first the first compared value
+ * \param second the second compared value
+ *
+ * \return true if compared values are the same, false othervise
+ */
 template < class T, std::size_t N >
 bool operator == ( const ptr_array < T, N > & first, const ptr_array < T, N > & second ) {
 	static compare < ptr_array < T, N > > comp;
 	return comp ( first, second ) == 0;
 }
 
+/**
+ * \brief
+ * Specialisation of non-equality operator for pointer array.
+ *
+ * \tparam T the type of values inside the array
+ * \tparam N the size of the array
+ *
+ * \param first the first compared value
+ * \param second the second compared value
+ *
+ * \return true if compared values are not the same, false othervise
+ */
 template < class T, std::size_t N >
 bool operator != ( const ptr_array < T, N > & first, const ptr_array < T, N > & second ) {
 	return ! ( first == second );
 }
 
+/**
+ * \brief
+ * Specialisation of less than operator for pointer array.
+ *
+ * \tparam T the type of values inside the array
+ * \tparam N the size of the array
+ *
+ * \param first the first compared value
+ * \param second the second compared value
+ *
+ * \return true if the first value is smaller than the second, false othervise
+ */
 template < class T, std::size_t N >
 bool operator < ( const ptr_array < T, N > & first, const ptr_array < T, N > & second ) {
 	static compare < ptr_array < T, N > > comp;
 	return comp ( first, second ) < 0;
 }
 
+/**
+ * \brief
+ * Specialisation of greater than operator for pointer array.
+ *
+ * \tparam T the type of values inside the array
+ * \tparam N the size of the array
+ *
+ * \param first the first compared value
+ * \param second the second compared value
+ *
+ * \return true if the first value is bigger than the second, false othervise
+ */
 template < class T, std::size_t N >
 bool operator > ( const ptr_array < T, N > & first, const ptr_array < T, N > & second ) {
 	return second < first;
 }
 
+/**
+ * \brief
+ * Specialisation of less than or equal operator for pointer array.
+ *
+ * \tparam T the type of values inside the array
+ * \tparam N the size of the array
+ *
+ * \param first the first compared value
+ * \param second the second compared value
+ *
+ * \return true if the first value is smaller or equal to the second, false othervise
+ */
 template < class T, std::size_t N >
 bool operator <= ( const ptr_array < T, N > & first, const ptr_array < T, N > & second ) {
 	return ! ( first > second );
 }
 
+/**
+ * \brief
+ * Specialisation of greater than or equal operator for pointer array.
+ *
+ * \tparam T the type of values inside the array
+ * \tparam N the size of the array
+ *
+ * \param first the first compared value
+ * \param second the second compared value
+ *
+ * \return true if the first value is bigger or equal to the second, false othervise
+ */
 template < class T, std::size_t N >
 bool operator >= ( const ptr_array < T, N > & first, const ptr_array < T, N > & second ) {
 	return ! ( first < second );
 }
 
+/**
+ * \brief
+ * Array construction helper. Array is constructed from provided values, type of stored elements is deduced from the first parameter-
+ *
+ * \tparam Base the type of the first parameter
+ * \tparam Types ... pack of remaining parameter types
+ *
+ * \param first the first parameter
+ * \param other ... pack of remaining parameters
+ *
+ * \return pointer array containing all parameters
+ */
 template < typename Base, typename ... Types >
 constexpr ptr_array < typename std::remove_reference < Base >::type , sizeof ... ( Types ) + 1 > make_ptr_array ( Base && first, Types && ... other ) {
 	return ptr_array < typename std::remove_reference < Base >::type, sizeof ... ( Types ) + 1 > ( std::forward < Base > ( first ), std::forward < Types > ( other ) ... );
 }
 
+/**
+ * \brief
+ * Specialisation of array construction helper for empty array. The type parameter of the array must be provided explicitly.
+ *
+ * \tparam Base the type parameter of the constructed array
+ *
+ * \return empty pointer array of specified values
+ */
 template < typename Base >
 constexpr ptr_array < typename std::remove_reference < Base >::type, 0 > make_ptr_array ( ) {
 	return ptr_array < typename std::remove_reference < Base >::type, 0 > ( );
diff --git a/alib2std/src/extensions/ptr_vector.hpp b/alib2std/src/extensions/ptr_vector.hpp
index 67211a66fc071b2551b4c302a9b6a7cbb38ed1ce..20815361afec1f974b07794cdd968a3c5a390c47 100644
--- a/alib2std/src/extensions/ptr_vector.hpp
+++ b/alib2std/src/extensions/ptr_vector.hpp
@@ -50,9 +50,6 @@ public:
 		insert ( cbegin ( ), std::move ( init ) );
 	}
 
-	ptr_vector ( std::initializer_list < T * > init ) : m_data ( init ) {
-	}
-
 	explicit ptr_vector ( size_type count ) {
 		resize ( count );
 	}
@@ -143,10 +140,6 @@ public:
 		return * m_data.back ( );
 	}
 
-	bool null ( size_type index ) const {
-		return m_data.at ( index ) == NULL;
-	}
-
 	/* T * const * data ( ) noexcept {
 		return m_data.data ( );
 	}
@@ -318,6 +311,7 @@ public:
 		m_data.pop_back ( );
 	}
 
+	template < class R = T >
 	void resize ( size_type count ) {
 		for ( size_type i = count; i < m_data.size ( ); ++ i ) {
 			delete m_data [ i ];
@@ -325,7 +319,7 @@ public:
 		size_type i = m_data.size ( );
 		m_data.resize ( count );
 		for ( ; i < count; ++ i ) {
-			m_data [ i ] = NULL;
+			m_data [ i ] = new R ( );
 		}
 	}
 
@@ -341,6 +335,13 @@ public:
 		}
 	}
 
+	void shrink ( size_type count ) {
+		for ( size_type i = count; i < m_data.size ( ); ++ i ) {
+			delete m_data [ i ];
+		}
+		m_data.resize ( std::min ( count, m_data.size ( ) ) );
+	}
+
 	void swap ( ptr_vector & other ) {
 		std::swap ( this->m_data, other.m_data );
 	}
diff --git a/alib2std/test-src/extensions/PtrVectorTest.cpp b/alib2std/test-src/extensions/PtrVectorTest.cpp
index ca07959f7bb9179ade135d8b060ef4ffb670b1ba..cf7a0e1f903c112f4062085996028d8045530a5c 100644
--- a/alib2std/test-src/extensions/PtrVectorTest.cpp
+++ b/alib2std/test-src/extensions/PtrVectorTest.cpp
@@ -54,9 +54,9 @@ void PtrVectorTest::testPolymorph() {
 	CPPUNIT_ASSERT ( data [ 1 ].type ( ) == PtrVectorTest::Type::CHILD1 );
 	CPPUNIT_ASSERT ( data [ 2 ].type ( ) == PtrVectorTest::Type::CHILD1 );
 
-	data.resize ( 4 );
-	CPPUNIT_ASSERT ( data.null ( 3 ) );
-	data.resize ( 3 );
+	data.resize < Child2 > ( 4 );
+	CPPUNIT_ASSERT ( data.at ( 3 ) == Child2 ( ) );
+	data.shrink ( 3 );
 
 	ext::ptr_vector < Base > data2 = data;