Kick generic matrices into shape

Less than tested, probably not finished