Multi-Clip Scripting

I am new to this forum and html5 coding and would appreciate some help.
Below is a Multi-Clip script that seems to achieve most things that I had planned.
However there are a number of issues that I would like corrected.
Firstly, when the player is closed the video (or rather audio) continues in the background even though the player window is closed.
What needs to be added to stop this occurring?
Secondly, The text relating to each clip is not centered correctly.
What is making this happen?
Thirdly, if many clips are added to the playlist, which could make the page much longer,
what needs to be added into the code to make this playlist function correctly and smoothly?
Sorry I am unable to include the code so had to do it via an image file

Any other suggestions would very much be appreciated

Thanks in advance