improve collection js
Merge pull request #851 from piotrantosik/feature/improve_js

Improve collection js