I have not gone through your code so this is a bit of of an assumption…
Containers will create all the necessary "things" in the container but they do not combine them together. I think you need to look at pinning your lines to the arrows. So you will have a line of code along the lines of
Create sprite : pin sprite2 to sprite