Clean up flask
Add SQL statement to set all Predictions to empty if there is no history of Grade
Fix count for prediction offset