Basic miner

Initial miner program. Needs a lot of polishing, but basic function works.