Various cleaning fixes