some const'ness and hints for clang