Improved performance by optimizing javascript calculations
Changed whitespace and layout