Add cleaning logic. Currently only tested in Windows, though.