Removed maxlength and err on emit.

Closes #3.