fixed moving average with tests
cleanup heat 2d