New data structure

I think it might be dangerous to default to `0` if the id isn't valid. Maybe this should rather throw an error or something?