mildly refactored boxes and cards