clean up

removed code for main chat
removed unused functions