Updated when things saved to the database. Instead of on_close
(application exit), things change when they need to.

Added the clock.