One thing that can really help is making sure that you don't reduce your consumption of dietary fats too low. Fats are essential for health and digestion, and oftentimes in the name of "healthy eating," folks wind up eating way too little fat, and fats can really help your body deal with more difficult-to-digest foods like beans and greens. For example, some extra-virgin olive oil on your green veggies will make them less likely to make you gassy.
So I would recommend including plenty of healthy sources of fats-- olive oil, wild-caught salmon, avocado, unrefined coconut oil, grass-fed butter and whole milk, meats, eggs, etc.
Make sure you soak your beans well, and discard the soaking water. Lentils and brown rice also often benefit from a soaking time, even though most cookbooks don't specify this. A lot of us also soak our grains, as well. The soaking begins the process of digestion, and breaks down the most difficult-to-digest compounds in the food so that your body doesn't have the burden of doing it.