refactor webapp model code that checks for submission completion