Refactor into classes that handle specific data types