Make the matrices work

Closes #19