Refactor matrix class to use proxy pattern. Optimize matrix_matrix_product function (40% reduction in startup time).