Fix obsolete syntax (to Rust 0.6).
Fix unused libraries compiler warnings.
Trait visiblity. Couldn't use length() from main.rs.
Fix pointer mismatches.