Cleaned up code in LTS.py