Loads of minor refactoring and cleanup (plus one potential bugfix in SceneDistributor)