This method is a bit long; perhaps getTotalResults could be extracted out to a protected method?