Fix most code style issues, reordering of headers tomorrow