Improve script somewhat.