code clean up, pleas see details here: https://groups.google.com/forum/#!msg/mechanical-sympathy/21erf7m9tJY/yJHvOzjuzp0J