Fix clean environment setup and testing