improved templating and creation system, bug fix #4