refactor message parsing/formatting, handle NICK
refactor handle_message