First implementation of the actor system. needs refactor