Code Cleanup Pullrequest: Lint Warnings

mostly lint warnings and one bug fix