Finally ported to Rust-0.6