Re-factor sample profile reader into lib/ProfileData.