Fixed the import error. Cleaned up a bit more. Trheading works.