cleaned up various code quality warnings
tests