Implemented auto dirty-checking on entity.js. Fixed bug with momentjs usage