Refactored processor to be class based