More work on event pump
g++ compatibility