Minor warnings cleanup.
Add remaining main statements.
Add more includes.
More system includes; clean old code.