JSON served from patient-similarity conforms to new UI

Code refactored and cleaned up. Passed smoketest and checkstyles.