fixes and improvements to .w