Refactored main application & made model more generic
Added functions to include all templates