Improving api with caching and image handling