Improve method type marshalling