Test for infinite loops
Update doT
More thorough testcases