Ok, you hear over and over and over again, don't do this, don't do that when developing SharePoint. But it seems that not too many people listen to all that wonderful best practice guidance. As part of the eBay project, we inherited A LOT of code from previous developers and consultants (which will remain unnamed, but ask me at SPC and I'll tell you). This code has so many bad components to it it was unbelieveable. Every SharePoint rule was broken. There were so many broken things that we couldn't fix them all, so we focused on the most important and visable items.
Maarten has done a great job of summarizing all the things we had to do to fix this code. Check out his blog post here: