Implement comparisons

Also clean whitespace and reindent
Add real tests
Rework imports to resolve load errors
Fix bug in to-scalar
Merge branch 'release/1.0.0'