Some more fixes for switching to user_id
Fixing unit tests