various changes to dow mostly and a couple of other minor changes. Also added util.js