Added friend filtering to all content, modularized code, removed dead code

added friend filtering to comment, post, link, photo
modularized code to make future modifications easier
removed dead (commented out) code