warning and some codestyle fixes