handle paths that begin with slashes.  clean up global var leak.  clean up console.logs.