Changes from uk_trials + enhancements
changes to react to new data model