cleaned up some depreciated functions in header.php and profile.php