Facebook API code cleanup