Get rid of maxima-based solve in favor of linear algebra code over the appropriate field.
Fix indentation; add docstrings.