UPDATE: Moved UI code into template
Merge pull request #724 from benjamij/CM-refactored-templating

Introduced template