Damien Fixed moving avg calculation, added a pseudotest/helper. Time for a re-org soon.