Refactor bits of advanced search

Also adds missing objects (Audits, Workflows and Sections)
More whitespace fixes
Merge pull request #1633 from reciprocity/feature/advanced-search-refactor

Feature/advanced search refactor