Code cleanup

Fixing bad coding style. Seriously, an one liner cannot be breaked with a debugger.
Use `$window` if possible
fix(tests): Old values won't be ignored, so they have to be discarded

In general, instead of testing against real localStorage (that would be nice demo), we should use `spyOn` to verify the adapter.

related #3
Merge pull request #44 from knalli/fix-test-setup

Fix test setup