Made the changes relating to maxResults and references.

SD-64 : make it work with new api

Made the changes relating to maxResults and references.