Implemented image caching, resolves #61