The Hamas - Fatah (Palestinian Authority proxies IIRC) election scenario was an interesting one. The PA was screwing the Palestinians over big time - diverting international aid funds to build mansions, etc - the kind of corrupt behavior that gets you tossed out of office. The Hamas, meantime, was being both a terrorist organization to the Israelis, and a perverted sort of humanitarian aid organization to the Palestinians oppressed by the PA - monetarily rewarding families of suicide bombers, etc. Ergo, they won in Gaza, and immediately began battling it out with Fatah in the streets. They won, and here we are today.
Note that I may have some of the details wrong, but the general gist I believe is still intact, that Hamas won by appearing to do more immediate good to the Palestinians, while screwing them over in the longer run due to their terrorist activities.
As for the cease-fire, 12 rockets have been fired at Israel in the 90 minutes since it went into effect. Israeli sources have stated ahead of time that they expected a "short tail" of dwindling rocket fire over a day or so, probably due to the uncoordinated nature of the Hamas cells now that they've had their existing leadership largely wiped out.