refactored StmtVisitor for readability
some more refactorings