turned on debug codes in dev mode, added some comments to application.js