Cleans up code, sorts list of tags on Resources index page.