fixed some issues with the printing
extracted some of the logic that was being repeated into 2 private methods inside the CommandProcessor, those methods would be called on from the public methods