Add sorting functionality to prototype.
Merge pull request #2 from john29917958/john-patch

Add sorting functionality to prototype.