Added error catch for missing credentials, added some helpers. update mining.