Added Actor registration and threaded management. Still needs more testing.