added IIFEs to every JS scrip and use strict and fixed whatever issues popped up