Cleanup and corrections