More testing and improvements