misc changes and improvements