Removed unneeded var from anonymous function.
Fixed sorting methods.
Added generic explain.