Refactor code logic to different kinds of processors.