some structural cleanup
make code analysis happy