cleanup and minor correction