modification of app js in order to follow better angular guideline