Cleaning up templates for better input (doesn't capture data properly)