clean up posts controller and fix links to author on search page