jasmine testing setup, completed tests for js/base.js
tests, tests and more tests
testing twilight events with stub light values
completed initial source refactoring