Some minor code changes; plus some doc