Updated cache timings and made code beautiful.