Tidy up the code and put in a DelayedJob and Mongoid probes
Add JSON format