I moved the function referenced in the code out of its own header and into the main function and just bundled everything together and now it works...