Integrate frameTen into frame functions. start refactoring