Changed the require to using. Pulled out the frame into its own def.