Massive update.

Haven't pushed for a long time, this is quite a big change to things.

Cleans up too much to list.