A bit of refactoring. Prepares to do the really complex code analysis.