Added EventDispatcher (work in progress) and changed index.html