More comments and minor refactoring of SharkSemanticAnalyzer.