to avoid the instance_exec class-renaming thing, you can accept an argument in this block
styling style_classes (the simplest way)
refactored 'layout' method to accept stylename, style_classes, and styles
changed setTranslatesAutoresizingMaskIntoConstraints to check target and relative_to