Adding MSI files

Updating cache functions majorly.
1. Adding MSI functionality
2. Cleaning up and splitting cache functions as required.