refactored the way templates are loaded and renamed views