Added test framework (Jasmine). Not including Jasmine code in my commits as it's not my code.
Minor changes including fix for 'current window' issue. v0.8.5 -> v0.8.7