More hacking matrix generation.