Reduced number of warnings: removed unused imports and commented out
some of the unused variables
Fixed a compile error