-Split out chat functions into it's own class

update #35