Improved track.py readability and PEP 8 compliance