standardized server responses, removed old debug code and unused functions