more code comments & minor cleanup