Completed implementation of the database including persistence (saving models). Also minor UI changes.