Refactoring js file
Merge pull request #14 from MichalPaszkiewicz/master

Refactoring js file