Script to automatically generate template structure

Closes #1