Refactored into a module. Added total_hashrate method