redo buttons on tables view
stuff
DRY
fixed merge conflict