Removed globals from all the Factories, which are now created in Main
and passed in.