Reorganize files and add template helper