Refactor inheritance between base file and environments.