Getting stuff done

Much progress. Averaging doesn't quite work...