Correct some logic and a simple integration test