Jasmine testing spec added, gonna TDD this refactor