Tidied up database