Custom Marshal class for structs (INCOMPLETE)