First small part of lib cleanup. Mainly "constification" of arguments and
adding FIXME's.
9 files changed