Added global variables for testing, will remove in the future