Refactoring
Marshalling fixes