Huge Refactoring to get rid of a lot of duplicate code in Command sending