Merge latest changes from @stanzheng.

Including API changes and single record route correction.