Command object pattern implementation