removing a couple magic numbers
basic length checks
adding esc key handling to back out of form