General clean up of code that generated warnings