Changed to helper function and fixed up the documentation.