Implemented chat autoscroll.
Fixed some bugs.