adding option formatting to component factory. making sure component factories only return modules and then are destroyed