clean ups in database interface