I refactored my code so many times. You know, it's just a handful of classes, but it took several months for me to end up with the current version, which is not necessary the final one. (I do this in my free time, and I don't have much of it.) I decided not to rush.
The main problem I was trying to address - is that I don't know on the moment of class creation which variables are required and which are not and for reason I had this complex logic in the constructor and actual methods, checking different branches of #config and deciding upon what is wrong and what is right. My TS definitions were abundant and also - complex.