Add page redirects back to list page.
Added util, with 1 function

I thought I was going to need this in multiple places. I was wrong, but
it's still nice to have here.
Moved attributes and relations tables to a lib file, so they can be used more easily in multiple places.
Added delete functionality

Works. Also added buttons to delete on the list pages.