some refactoring with matts help
Merge pull request #64 from kyledaugherty/jasmine-tests

some refactoring with matts help