Merge "Fix 'end' command, initialize next in linked list" into nyc-dev