Improved and tested autofac factory support