Logging and various untested/unbuilt improvements