Refactor to remove use of 'id'

closes 8