Code spring cleaning. Stuff moved to templates