Modified code to support command-driven service requests.
Added a few comments, in case anyone ever reads this. ;-)