Code comments and minor cleanup