Refactoring data conversion library