Move Write Functions to Data Classes