Okay so I wasn't able to successfully build Circonian's Stamina Bar but I did manage to use your advice in order to create a working version of
this tutorial.
I have learnt a lot and am now trying to look at other people's addons and trying to see how they made everything work elegantly.
Thanks again!