Fix @switch patmats, minor style fixes