cleanup and make foo.com/shim works without jquery
format code