Improved marshalling