Updated with matrix caching routines