Refactored thread machine to be created by a controller factory.
Updated all code to use controller factory.
Fixed some typos in comments.
Change ThreadRunnable to take a event listener as part of its constructor.
Modified ThreadMachineController to be non-static.  Now depends on
ControllerFactory to manage its lifetime.