Minor refactoring; minor internal documentation changes