Adds template system

Cleans up file structure
Adds template system