Minor documentation and code refactoring.