upgrade to Jasmine 2.0, update tests, minor code cleanup