Cleans up code for jshint.
Removes several lines of statechart debugging code from non-debug builds.