Reimplement working chat

I saw that there were some initial workings for a simple chat mechanism - seems like a good idea, so I've finished it off.