restructured js and changed bootstrap to foundation