Next generation

Adding @warebot's changes to bring NextGen up to date.