Replaced console.log with $log
Introduced app configuration as constantE