little refactoring.
Fixed the integration test, hopefully.