Various fixes, perhaps even merge-worthy...