Code cleanups, notably in the Python plugin (simplification of the header file inclusion logic)