M4 improv

Improvements discussed, separating the median calculation into four horisontal blocks. Fixes #2.