Updated matrix module.