Rewrote a bunch of stuff for the new format