ClarionTest - Code Cleanup and major refactoring of ClarionTest_Main