Use miner.cpp/h

Remove code from main.h/cpp