I was refactoring my code and decided to replace ES6-classes with factory functions. So before the changes I had something like this: