Displays events dynamically, adds buttons to switch, TODO: fix typerrors.