Fixed a variable naming error I made, and delegated the galery and video event handler