Refactor tables

Moved all the duplicated functionality between the raw view and filters
view into the table view.