New header comment and some refactoring