Removed many debugging print statements in the functions.