I found a nice blog entry about refactoring via one of the popular links sites (I thought it was Reddit, but I can't find it back any more). I like it.
My favorite quote (by Larry Wall, heh) from that post is
Don't buy something unless you've wanted it three times.which is, technically, not a programming quote. But what it means to a programmer is this: don't bother refactoring into a separate module until you've needed a particular functionality in at least 3 applications. Before that happens, you won't have a good idea how to generalize the code, yet.