Refactor to eliminate unnecessary actors and improve correctness