Outline of core processing logic.