Fix quit handling and start pretty printing