chat part updates

DRYs up chat
adds tha entry hooks
cleans up code