Another bunch of compile fixes (some of the being quite temporary ones).