Made mining stop automatically when done and reimplemented m buttong for toggling mining.