Fix a lot of memoryleaks (LOTS of them)