refactor applicationList into a directive