Who said programming is not fun? How about your favorite programming language doing (a part of) Queen’s Bohemian Rhapsody?
Refactoring your own code is, what I guess, something that you do frequently – at least I am. Maybe a better description of the process I went through would be rewriting, but let’s stick with refactoring. Either the routines get too complex, or there’s an extra parameter needed or there’s some new special case to be handled, never mind the reason, refactoring of your own code is what we all do and should do.