Fix issue #506

Address passByValue, variableScope, postfixOperator, memleak warnings/errors
Recommend unusedScopedObject, unreadVariable warnings be treated as false positives.
Also ran astyle on the entire lib folder
See #506 
Trailing spaces?