Adds some Tests

@andyburke  what do you think? I go a small amount of code coverage done.
I wonder if it would be worthwhile to do some API checks here. Check if sidebar has the right prototype. Check that the prototype has the various functions we would expect? Overkill?