Move register_template block