Update AverageCastAge

Code cleanup and added comments to complex code blocks