Refactored code to only need 1 function to init any chosen frame