Modified FrameFactory so that it works as an abstract factory