Totally functional!
Final and fully functional cache functions. Correctes some typos and added some comments.