I have always liked to think that Spike, once he began a friendly association with the Summers women, restrained himself from doing them any harm initially through sheer force of will. He and Joyce became friends long before the chip, when he could have harmed or even killed her without a single qualm. At the beginning of Season 5, when the demon bikers were wrecking Sunnydale, he made the statement to Dawn that it looked like fun. He didn't join in that fun, however, not because he thought that it was wrong, but because he had made a promise to a lady to protect Dawn, but it was because of his will power and sense of honor, not any feelings of right or wrong that he did that. In the bathroom scene in "Seeing Red," when Buffy finally pushes Spike away, I have always interpreted his look of astonishment as him coming to the realization that he can no longer restrain himself from acting in a normal vampire's fashion. His control is at last slipping, and he is becoming a danger once more to people who he really cares for (I know, I'm probably reading too much into a single facial expression, but that's how I see it) THat in no way excuses what he had just attempted to do. Rather, it simply meant that he actually felt, for the first time, that something that he had done actually WAS wrong, a truly amazing realization for someone who should not have seen any difference whatsoever in right or wrong.
As for Spoke's quest to regain his soul, logic would, I believe, dictate that that wasn't as much a spur of the moment thing as it was depicted to be. Again, this is only my theory, not actual fact, fut he knew where to go, who to see, and pretty much what would be required of him when he got there. Also, he apparently made arrangements about getting to and returning from his destination in advance, even apparently going so far as to assure that there would be someone there who he trusted to get him back after the trials, otherwise he would never have been able to get back to Sunnydale.
As I said from the beginning, this is only my conjecture and theory, with no conformation whatsoever from Joss, James, or anyone else associated in any way with the show, but it seems logical to me, and it's what I'm sticking with until actually proven wrong.