Refactored javascript code into self-executing anonymous function
Merge pull request #12 from amdziuk/refactor

Refactored javascript code into self-executing anonymous function