Remove unused static variables.
Allow use of static variables in static methods.
Fix and simplify declaration printing.
Use == instead of = in comparison.