Refactor scene management to fix huge bug that was causing the wrong scene to activate