Fixed form entry and set maxlength. Cleaned up