Update forms
Refactor the code