Implemented basic queueing of mode-changes from the webserver.  This is just a proof-of-concept and not actually a good way of doing things.