Refactoring view displaying code
Moving template execing code to its own file