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.
Probably want to put this first as `'int, float or tuple` will be identified as `float`