Move templates and static out of codes