tidying up - removing unused files and fixing the db methods used (no longer using the read-only methods)