Added Index Buffers
some data protection

nulling IDs before they are assigned.