NF: First pass at porting an implementation of EMD as an extension.
DOC: Change order of params.

Duh