Refactor facebook