Global comments refactoring and fix some issues