ref #77: various code cleanups
ref #77: comment and whitespace cleanup