cleanup and corrections