clean up some Miner code