Refactor for better code reuse in processor classes