Refactoring IPC::Open3::Callback

Some refactoring as discussed in the previous pull request