Ported to latest Rust changes.
This is 0.0.5