few additional memory leaks (mainly in importing pictures)