Fix code issues. Integration tests are green