Lots of fixes and improvements for beta 3