Templates cleanup and reorganization.