refactor, clean up chat view