refactored to put common data into classes, working for client (not yet
tested for httpd)
httpd etc now seems to be working