Refactors picture filtering in admin backend and adds specs.

Moved the picture filter logic from controller to model.