Profilce added, refactored javascript codes