Refactor cleanup tables