Comments and minor code tweaks