Further changes. Add new FrameManager function and refactor FrameFunction