move config.h inclusion after type declarations