Ported to Rust-0.8

Minor trait fixes to make it compile on Rust-0.8