Small code refactoring. Add docs comment.