refactor construct tests and add environment