Bugfix: local variable shadowed proper variable.
Warning removal: const on return types not needed.