code clean up
more injection refactoring for thumbnail cache