Small modifications and improvements