Refactoring and fixing comments