added category
replaced script filter

replacing the script filter with the same script filter mysteriously
resolved the issue that the last item of a result displayed as the
first item
fixed comments
removed useless variable
added handling for connection errors and empty responses