headers and small fixes