Refactoring: move deserializer to dedicated package.