Cleaning up SemanticAnalysis