Added basic functions to tfr_reader.py, cleaned up tie.py