Some semantic changes and comments