add command support.

added support for commands so we don't have to use a listener every time
we want to create a command.