Converted to library and added wrapper for httpd.