General corrections and improvements