Added a command datatype and dispatching mechanism