adding tests, minor fixes to permutations

make methods static, ensure no duplicates are added to list of
permutations