Refactor input form code, add test and arc button