Improved marshaller

Allow for strings to be passed when array of bytes are expected.