Improved distinct(), added docs.