Add formModalService, refactor code