Adding checkin/chekout and fixing database error.