[MR,BB]{refactoring} - cleaned up unused variables/functions, fixed
other warnings, coding standard