Files modified for modernization backport from rat4/blackcoin