Fix #315: Use "id" for identifiers everywhere

This patch renames space.n to space.id