few changes to database and some minor tidying