Move header files to places where they make sense
Remove the listener when the last request is done with it
Don't leak memory on exit
Look for kqueue() and sys/event.h
Enable kqueue for the main event loop

Which should be faster than select() for lots of sockets