Modjam rewrite (basic functionality, more sorting coming in).