Redo the template manager. Much simpler this time. It might even work.