ServerFactory added

To provide better control of dependencies and make Main() simpler