Fixed composer requirements. Added better tests running script.
Added abstract method element() to collection class returning instance of new empty element.
Added phpDoc type hinting in some places.