fixed chat and routing. working on cleaning up chat