Fixed divide by 0 error and added documentation for creating the data table