Remove (almost) duplicate shared headers.
Reorganize source directories.