Upgrade codes to be compatible rust 0.9-pre