Remove unused variables and extra commented code.
Get rid of VOID.

I'm not going to bother supporting compilers so old they don't
understand void.
Remove dead assignments.
Fix memory leaks.
Fix possible use-after-free.
Fix possible uninitialized variable usage.
Fix checks for blocked GLUI controls.

There's no point in checking if glui is not NULL since in most cases, we
use it right afterwards. Since the code's implicitly assuming it's not
NULL, there's no need to check it. I'm not sure why they bothered to do
that before.
Fix some overridden virtual functions.

Clang still reports about a million others. They're a lot more
complicated though, since some of the overriding methods don't match at
all to the parent class.
Fix an uninitialized variable.