Solved average() bug!
Part C added.