Loads of doc and test cleanup.