Fix an off by 1 error in indexing
Made the javascript more efficient, removed modernizr