Added aggregate function
Updated alerter to send SMS when average is below threshold
Updated alerter to work fully correctly