I really appreciate this module, but I had a hard time reading the code.
This patch re-writes a lot of the code according to Drupal's coding standards.
And I've provided the whole lot as a ZIP file, in case it's easier to read that way.
2.0
Code
It would make a good project for someone who is new to the Drupal contribution process. It's preferred over Newbie.
The patch will have to be re-rolled with new suggestions/changes described in the comments in the issue.
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.