Added basic marshal/unmarshal behaviour