Images are removed when a fact is deleted and facts are deleted whenever their course is deleted.
Bunch of bug fixes and small internal improvements.