More modifications and improvements