Pull in changes from upstream - sync

Add in changes from Kefkius PR #8 in Mazacoin/mazacore