mass clean up and reduce warnings