refactoring and cleanup

1 job for feat/resend_nack in 54 seconds (queued for 9 seconds)