Cleaned up a bunch of compile warnings about unused variables and such