Mining optimizations

Tested.  Woop.