small improvements: clear input, addeventlistener, validation, toggle edit button text