A lot of them could be SQL, which can much more easily be inlined, and is easier to comprehend. Would you be interested in a patch to do this refactoring?