Fixes widget initialization problem in browser

Also, fixed some warnings that editor found regarding unused variables.