chat code updates including popout feature