cosmetics and minor code tweaks.