refactor autofac