Various javascript updates from foundation