Using new dispatch function fully.
Basic http server. Doesnt correctly terminate yet.