Jasmine: replaced a lot of "any" with correct types