Added core file and converted tests from Mocha to Jasmine