Added some stuff to save a checkin to database. Other small fixes