Removed unchecked warning.
Refactored some behaviour to base classes to ease the FCGI
implementation, and taken the chance to remove redundant code.