Fixed a few warnings, dead code