Debug server, tweaks and fixes