Fix alphabet setting bug.
Add tests for the new, class-based methods.