Added profile updating functionality.