Cleanup include statements

Remove useless includes and add some preprocessor conditions for platform specific headers.