Add setHandler for a less magic way of setting handlers for commands