some code cleanup for removing warnings generated by clang