Fixed issues with node deletion and rearrangement.
Merge pull request #124 from darkowlzz/integration5

Fixed issues with node deletion and rearrangement.