initial commit
moved Generate_Profile to separate file
minor bugfixes & changes