Tidying up updatedatabase.pl