headers and a lot of small fixes 2