Refactor
Split off header structures, simplify