updated ember and refactored some code
small changes