Revamped the "average" aspect and a few small fixes.