use of templates and some cleanup on post_install