Refactored class initialisation ...

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