Refactor the miners to entity