Cleaned up and commented web.js