Unused vars

A bunch of unused globals, vars, etc.