Got variables to work by modifying many of the functions and including new headers to use new functions