Warnings roundup

-removing unused variables
-removing unused imports
-removing unnecessary typecasts

!These are just where I thought it was unlikely to conflict; other
warnings remain