Cleaned up socials code, also fixed socials memory leaks.