Refactored the command and client proxy to follow the command pattern