Average calories

Added the analysis menu which now includes average calories, plus minor
improvements.