Added initial next implementation
minor tweaks to next