Removed permute.py and made it a function within the file (also, removed the unnecessary pieces of the code.)