cleaned up scene mapping code.