added /quit, organized into functions, added message formatting