Give class directly to object constructor if possible

Signed-off-by: Stefan Marr <git@stefan-marr.de>