Autolayout fixes

- Ensure that we calculate frames in the right order
- Do frame calculations in `layoutSubviews` instead of `setFrame:` since autolayout doesn't call the latter.