Use miner.cpp/h

remove code from main