Fixing a problem with order of updates in scene and made a refactoring along the way