Cleaned up leakcheck