Changes to tables UI.
Some code clean-up.