Fix tables deleting. Small refactoring