divide by zero fixes

On branch master
 Changes to be committed:
   (use "git reset HEAD <file>..." to unstage)

	modified:   qhistory
	modified:   setup.py
Added fixes for some divide by zero issues. Added logic for per user statistics output