A framework for the Command pattern