Fixed word wrapping.
Added tests.