It was a positive start for Gregor Townsend's men with a 31-19 win at Murrayfield.