Refactor process items and dependency cleanup