Added DEBUG print statements throughout code in preparation for running the code