Refactor results table (again) so search-specific stuff lives in search
Tests and jshint