Update the serializer with the code from Johannes and add support for class inheritance and SkipStepException.