this is ugly: better split the logic corresponding to ClearCommand and PutMapCommand to visitCleanCommand and respectively visitPutMapCommand and make this method receive an DataCommand as param and be invoked by all other visitXyz methods