Minor cleanup of algorithms code.

I had started making these changes as part of a different PR, and thought they would be better separate.

This is pretty old code, and these changes just bring it up to date some.  Shouldn't be anything too controversial unless you plan to continue using this with Julia v0.1. :-)