Refactoring, fix comments, etc.