Fixes for has_mining_access and cleanups