Tiny fixes.
Add substr and equality comparison.