Improve header code