Refactor IO lifting