More code sweep and syntax changes