Changed signatures to take in an Environment object