Overall cleanup, additional attributes and a template