unsigned ints > 0 so errors won't be recognized
Fixed copied code bug; timeout gets set to 1 if timeout <= 0 or timeout > 255
Removed dead code in plugins
Some code styling issues