My additions to help work with Auto-layout, now converted to Swift