Fix errors found by GCC.
Make methods that can be const/static.