Fix some tmux bugs, optimize some function var passing and USP conn counts