Refactor code and introduce GlobalsCollector class.

This class allows users to create multiple collectors for
different objects at the same time.
Add .gitignore file
Update JsDocs & README.md with new instructions.