cleanup.
Updated tex
Fixed timing bug.