Jasmine spec runner framework set up
Fix some bugs
Fix subtle promise error