Added mouse stuff plus proper TERM for mac