First working version

Not entirely ready for delivery, but it watches the API, and will start/stop the miner okay