More bug fixes for filtering tables and the states.
Some cleanup of UI and code.