Some more refactoring. Adding deserializer convenience methods.