fixup! refactor data types into classes