Matrix4 refactoring