Refactored Marshalling class and created separated classes