The secret to perfect frosting is to apply a “crumb coat”. It’s a kind of frosting primer that will keep all those pesky crumbs from getting mixed up in the frosting. Apply this first coat, be careful around the edges, and let it chill in the refrigerator for 30 minutes before slabbing on a second layer of frosting. This second layer will spread easily, without going messy or tearing the cake appart.
(Picture courtesy of Baker by Nature)