light refactoring of processor