minor comments and spacing changes
little refactoring + adding comment around the creation of a "type-of-primitives" index
Exclusion-principle wobbling: objects wobble a bit if they are painted consecutively in exactly the same place.