Flag friends

Have a look and if the theming functions cannot be here, can you give me some clues, cause I don't see any other way of doing it.
features:
- "Add friend" button on a user profile page, in the action block
- "Friends" tab on each user profile page
- permission to see other member's friends