Refactor NAF submit script