fix headers, and forwd decl a bit

apparently someone doesn't know the rule of "own includes first, and
header for corresponding translation unit always above all"