Chart generatin per-subject
Calculate average function added, fixes #15