Ignore:

Added Intellij Idea files to the gitignore
Refactoring and Testing:

Added some tests via Jasmine and refactored a bit.