corrections and cleanup