Fixed a bug in the input, made it work on Enter, added max-length.