Undid some of previous commit

- Most matrix functions are now back to output by return rather than
output by argument, after some profiling I discovered this was faster