Improved code for augmenting an environment with declartions.