Further testing and updated documentation.

As far as I can tell, the added returned values do not slow down the function at all.