working version of greenhead+vdc server. fixed bugs and made more stable