Removed unnecessary cast, property access.
Clean up.

Setting Attachment clears vertices count.
Fixed double free.