do a mega refactoring of tableeditor