[WIP] Trunk

Very WIPy... iirc the main thing missing were the hooks.