Refactored pretty printing. Implemented new Server mode.