total rewrite, now with an embeded web server
adapted for new daemon