Re-factor process_eps
Re-factor process_eps

Break out the state checking and lock taking from the main processing
loop.

CarlFK/veyepar,CarlFK/veyepar,CarlFK/veyepar,xfxf/veyepar,xfxf/veyepar,xfxf/veyepar,xfxf/veyepar,CarlFK/veyepar,xfxf/veyepar,CarlFK/veyepar