Removed about 130 warnings

All unused variables removed. 49 warnings remain to be fixed.