Refund unused resources if refining/mining cannot be completed.
Merge pull request #5 from jakkarth/development

Refund unused resources if refining/mining cannot be completed.