Changed error handling for postSearchForm and did reformatting