Changed the way commands are packed to increase performance