Added average wave value calculation and return methods.