Changed FrameFactory API to allow users to implement their own factory