Feature/algebra

Bugfixes and Tests for CSC ops.

Still going through pull request initially, but I'll merge it. Just so that there's a record and notification until I get more comfortable.