comments and minor cleanup