Update comments, minor code improvements