First pass at revising command handler
'handled' code is now decoupled from error code