Minor refactoring and documentation updates