Refactoring code and adding concatenation of all JS files