completed first step of teajs integration, improved environ copy