Facebook: Various improvements to the Facebook logic