clean up, update templates, update tests