rename some command fields, flesh out mining algorithm