Changed companion type definition from abstract method to constructor parameter