fix splitting and tweak headers