Cleanup and post template linking