fixed tests, refactored token's flags, removed ioSemaphore from pool