The command design pattern never ceases to amaze me. Package up a complicated process in an "input, process, output" package. Turn it into a black box. The input should be as small as possible, just the details and data you need to "do the needful". The output should be as little as possible to explain how things went. I usually let my code grow organically, but once it gets to a certain point, using this technique really helps clean things up.