[TTB] Made propagate logic much nicer

The propagate logic was really nasty, so I split that up to be much nicer. I also got rid of all global variables.
You're welcome Matt.