Improve collection js

Example usage: need to limit amount of added collection items