simplified html, removed unnecessary ids and data
fixed division by zero algo