Added IORef code to WebUI

Replaced TODOs with IORef code