Better ui implementation with submit and reset functions