Compiles and passes all tests with new refactoring. Visualizes integrity queries