fixed warnings as best I could.