Impoved internal documentation and cleaned up code. Added a bug fix for auto selection of a profile after it has been created.
Finish hotfix-1