Bug fixes after test cases

Things that still may need work:
differentiating between null collections and empty collections
circular objects
deleting children seperately