Edited port for web.js