Tidying up

Removed unused code, extended comment on IDs.