Add filter to edit cookie time.
Refactor code that's only needed after submitting a form.