Co-authored-by: silverwind <me@silverwind.io>
The old code is inconsistent and fragile, and the UI isn't right.