Added in casts to pacify C++11 warnings.
Moved a few things around.
Added support for a few different types of clients.
Include unistd.h.
EventGenerator is part of DisplayServer now.