implement templates package
drop Environment::getInstance
small fixes
tag fixes