Refactoring some errors on header