Clean up of tlerangerate.py

Removed obsolete functions and debugging code