Refactor departure generator