Improve phrase generation

Fixes #5.