adding template class with recursive template builder method; seting up environment.rb