Minor fixes
Correctly compare values in cas
Use "1" as thread name for the main thread
Improve comparisons
Improve comparisons in CESK, fix indentation