fixup! fixup! fixup! refactor data types into classes