Lots of rearranging, added some metadata