Smaller fixes and improvements