refactored options menu handling a bit