Split app.js into a file per component.
Added injections for function parameters, to make code compliant with the coding standards.
Added IIFE (Immediately Invoked Function Expressions) to wrap the components and function definitions.