improved header class structure
improved header type handling