Moved chain generation to main assembly.