cosmetics: added missing copyright headers; whitespace; #include reordering