Fixed header file inclusion error.
Fixed stupid bugs in the select set class (timeout had been calculated wrong)

Also, some const-incompatibility made the file uncompilable.