minor corrections and cleanup