Removed two functions.
Declared global vars, removed a lot of unnecessary code, got the $observe working, got karma working, started working on the tests.