tweaking chat implementation and initial map code