Finished database and added caching.