Refactor registration modal/form