query site.js code changed to be more object based.