Adds loading spinner when opening gallery
Fixes unit tests