added some more functionality to profile page and reorganized some jquery