Added in permutations and append functionality.