Clean up database entries