misc corrections and cleanup