moved expandUrl to netlib.js