Continued work on mode management and returning data