Added support for commands

Added a method to link commands to actual buttons.