Fixes on outdated Jasmine specs, + bugfixes, improvements.