removing references to database