cleaned up client and formatted messages