Fixes some errors in database file and minor changes to Views