Issue 3264: Some simple changes to get the profile to work. Some various other changes.