fix lint warnings and reformat code

added current pull requests from orig-repo