Generalise Matrix class to cope with different storage layouts