semantic: Remove dead code
semantic: Error on global lookups
semantic: Some minor cleanups