Prototype code for friend tracking

Initial commit for friend tracking.