Refactored actor code into its own controller