Merged Environments into the mod.
Optimized some code.