Some other minor tweaks snuck in here, including supporting more discontiguous memory segments and some cosmetic tweaks.