Adds java7 to integration tests, cleans up the code