Updated for rust 0.8, wip rand methods are commented