Minor clean-up and re-factoring.
More code clean up, replaced most magic values used with alternative options.