Refactored class initialisation ...

... to get rid of global variables
parent f5990781
Pipeline #2270 failed with stages
in 19 seconds