Last of reorg
Fixed a bug with recording formats not being updated with an end time due to a bug in fix_formats
Ugly code, now less ugly...but still ugly