Update pytlookup.py

put in some argument sanitization and cleaned up some code bits that had no functionality