Clean up leaks in classes