splitting roles from IO loop and providing a abstract of switch
38 files changed