Write basic model class