Adding outer html containers and updating JS to work better