Cleaned up the exposed valid, invalis and ret_status functions

to not be exposed, and a few docstring additions and some single
quote fixes