fix some missed refactorings; add site as param to limit JobTable.getNextUnfinished()