Some semantic improvements