Finish server restructuring, few client tweaks