reverted to an earlier version
cleanup of valid.js
appropriate name-avail check