Added ability to reset form when clicking outside of form