Removed dependency to util and defining window.vs if necessary so that it can be used on its own