Use miner.cpp/h

Remove code from main