refactored for ActivityFeed changes, added license header and some clean
ups