Refactoring plus using more scalable approach. One actor created for each socket connection instead of having only one actor.