Refactor actor model