small cleanup + stability changes