checkpoint before bed
Massage json output to make it more useful, fill in mysql funcs for logging events