[WIP] refactor data types into classes