Functionality to edit tables