Refactoring, fixing #8, and adding first Jasmine test