Cleanup dup request code and fix resp code handling