Refactor task input form into view