fixup! fixup! refactor data types into classes