Added handlers and submit method rewriting.