Initial permutation
General changes and adding functions
Substantial changes