Some minor tweaks and changes -- just trying to understand the code.