Lots of code comment, whitespace, ordering clean-up
some more refactoring; swapped out some tracing for formal logging; cleaned up most compiler warnings/optimizations and other minor clean-up