corrected include statements and added some preprocessor stuff to header file