Rewritten Cleaner, but some memory bugs