Added some changes that were not applied to new-coins during the previous merge from the master branch.