added comments for hamtest.c for logic and explanation of code, removed debug printfs