Added some support for server handlers, probably still needs some work,
and definatly needs to be finished.