Added #ifdef tests to header files so they are only included once.