Fixed wrap_lib

Addressed all comments from the previous PR from Tom. Closed that PR and opened this one. Contains the completely updated and corrected wrap_lib.py module.
In order for the docstring to be correct, each parameter or return variable should be a complete set of variable name, type, and the description of what it does, right?
I'm adding this additional check just to be on the safe side though.