There are a couple of guidelines for gluten-free baking which improve the outcome of your efforts tremendously. Both I noted in the directions for recipes posted but they deserve extra emphasis.
When using your own or a commercial gluten-free all purpose flour mix whisk or shake it so you have as even a distribution of the various flours as possible before measuring. Follow this by sifting the measured flour with the xanthan gum, baking soda and other fine, dry ingredients before incorporating into the mixture.
Buy yourself an instant read thermometer and use it to determine when a cake or bread is fully baked. It does leave a hole in the baked product but I even test one of the muffins before removing them from the oven. Batters using starches for structure need to reach an internal temperature of 200 degree F to set properly.