Cleaned up Image caching code and made it global