Modified to compile with latest version of rust.