Update to rust 0.12 and some other changes