More work on unmarshalling, although having problems