For the SNP, the goal going into this election was clear: win an overall majority and begin agitating for another independence referendum.