Refactor Actor initialization into init.js.