Convert word frequency generation to a concern (closes #43).