Semantics cleanup