Small refactoring and update comments.