Restructured source to conform to Akka