Refactor Attendance model