cleanup + line templates