Create matrix.php
Minor rework. Still not finished
Merge branch 'matrixdev'