Minor fixes/tweaks, lots of explanatory comments