Added id field to object struct. Changed dot file dump to use obj id as node name.
Fixed all memory leaks.