Relationship between users, misc improvements, some tests