More refactoring
Environment is no longer used, but will likely find use later