Set id to pubic_id
Added some documentation