Initial script handles eternal loops. Improved testutil and fixed bug in test case template generator.