Various refactoring

Merged Hugo Beauzée-Luyssen requested to merge chouquette/medialibrary:refactoring into master

This MR consist of a few refactoring that were added during the #102 (closed) & #216 (closed) dev, but which don't really belong in the respective MRs.

Merge request reports