Fixed terrible media error

(asort wasn't changing index #, so every new median call just picked
pseudorandom # from middle of index - anyway, checked with excel and
should be fine by now)
Improved error detail, removed prism