Simplify `setImplementedInterfaces`
Fix scope to create a class inside a Closure