Added Jasmine tests and extra check on erroneous id in url hash.