headers reordered, small fixes